package com.mfhcd.facepay.model;

import androidx.annotation.Nullable;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.library.baseAdapters.BR;

import java.io.Serializable;

/**
 * Author：石强
 * E-Mail: shiqiang@mfhcd.com
 * Date：2019-07-04
 * 版权所有 © 现代金融控股（成都）有限公司
 */
public class TypeModel extends BaseObservable implements Serializable {
    @Bindable
    private String dkey;
    @Bindable
    private String dvalue;
    @Bindable
    private boolean status;
    @Bindable
    private String remark;

    public TypeModel() {
    }

    public TypeModel(String dkey, String dvalue) {
        this.dkey = dkey;
        this.dvalue = dvalue;
    }

    public String getDkey() {
        return dkey;
    }

    public void setDkey(String dkey) {
        this.dkey = dkey;
//        notifyPropertyChanged(BR.dkey);
    }

    public String getDvalue() {
        return dvalue;
    }

    public void setDvalue(String dvalue) {
        this.dvalue = dvalue;
//        notifyPropertyChanged(BR.dvalue);
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
//        notifyPropertyChanged(BR.status);
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj instanceof TypeModel) {
            TypeModel item = (TypeModel) obj;
            return this.dkey.equals(item.dkey) && this.dvalue.equals(item.dvalue);
        } else {
            return super.equals(obj);
        }
    }
}
